#include "tcpServer.hpp"
#include <memory>
#include "GA_thread.hpp"
using namespace Server;
void my_Errno(char *n)
{
    printf("请正确输入#%s,port\n", n);
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        my_Errno(argv[0]);
        exit(1);
    }

    uint16_t port = atoi(argv[1]);

    unique_ptr<tcpServer> ret(new tcpServer(port));

    ret->initServer();
    GA_thread();
    ret->start();

    return 0;
}